package com.chuangjiangx.member.coupon.ddd.domain.model;

import lombok.Getter;

/**
 * Created by zhoufushou on 2017/12/16.
 * 卡券过期提醒
 */
@Getter
public enum InvalidRemindType {
    NOT_REMIND("不提醒", 0),
    REMIND("3天提醒", 1);

    public final String name;
    public final Integer code;

    InvalidRemindType(String name, Integer code) {
        this.name = name;
        this.code = code;
    }

    public static InvalidRemindType getType(Integer code){
        for(InvalidRemindType back : values()){
            if(back.code.equals(code)){
                return back;
            }
        }
        return null;
    }
}
